+Fri Feb 1 23:25:33 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_init): Parse the
+ RC string here when the first object is created
+ rather than in the class_init to not break doc
+ building. (#70341, Havoc Pennington.)
+
+ * gtk/gtkrc.c (parse_include_file): Use the directories
+ for the currently parsed files as the starting point
+ to look for include files. (#59975)
+
Fri Feb 1 20:21:56 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkinputdialog.c: use gtk_label_new_with_mnemonic for labels
+Fri Feb 1 23:25:33 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_init): Parse the
+ RC string here when the first object is created
+ rather than in the class_init to not break doc
+ building. (#70341, Havoc Pennington.)
+
+ * gtk/gtkrc.c (parse_include_file): Use the directories
+ for the currently parsed files as the starting point
+ to look for include files. (#59975)
+
Fri Feb 1 20:21:56 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkinputdialog.c: use gtk_label_new_with_mnemonic for labels
+Fri Feb 1 23:25:33 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_init): Parse the
+ RC string here when the first object is created
+ rather than in the class_init to not break doc
+ building. (#70341, Havoc Pennington.)
+
+ * gtk/gtkrc.c (parse_include_file): Use the directories
+ for the currently parsed files as the starting point
+ to look for include files. (#59975)
+
Fri Feb 1 20:21:56 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkinputdialog.c: use gtk_label_new_with_mnemonic for labels
+Fri Feb 1 23:25:33 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_init): Parse the
+ RC string here when the first object is created
+ rather than in the class_init to not break doc
+ building. (#70341, Havoc Pennington.)
+
+ * gtk/gtkrc.c (parse_include_file): Use the directories
+ for the currently parsed files as the starting point
+ to look for include files. (#59975)
+
Fri Feb 1 20:21:56 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkinputdialog.c: use gtk_label_new_with_mnemonic for labels
+Fri Feb 1 23:25:33 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_init): Parse the
+ RC string here when the first object is created
+ rather than in the class_init to not break doc
+ building. (#70341, Havoc Pennington.)
+
+ * gtk/gtkrc.c (parse_include_file): Use the directories
+ for the currently parsed files as the starting point
+ to look for include files. (#59975)
+
Fri Feb 1 20:21:56 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkinputdialog.c: use gtk_label_new_with_mnemonic for labels
+Fri Feb 1 23:25:33 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_init): Parse the
+ RC string here when the first object is created
+ rather than in the class_init to not break doc
+ building. (#70341, Havoc Pennington.)
+
+ * gtk/gtkrc.c (parse_include_file): Use the directories
+ for the currently parsed files as the starting point
+ to look for include files. (#59975)
+
Fri Feb 1 20:21:56 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkinputdialog.c: use gtk_label_new_with_mnemonic for labels
+Fri Feb 1 23:25:33 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_init): Parse the
+ RC string here when the first object is created
+ rather than in the class_init to not break doc
+ building. (#70341, Havoc Pennington.)
+
+ * gtk/gtkrc.c (parse_include_file): Use the directories
+ for the currently parsed files as the starting point
+ to look for include files. (#59975)
+
Fri Feb 1 20:21:56 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkinputdialog.c: use gtk_label_new_with_mnemonic for labels
])
AC_PATH_PROG(SGML2HTML, sgml2html, no)
-AM_CONDITIONAL(HAVE_SGML2HTML, ! test x$SGML2HTML = xno)
+AM_CONDITIONAL(HAVE_SGML2HTML, test x$SGML2HTML != xno)
AC_OUTPUT([
config.h.win32
return is_varname;
}
+static void
+parse_include_file (GtkRcContext *context,
+ GScanner *scanner,
+ const gchar *filename)
+{
+ char *to_parse = NULL;
+
+ if (g_path_is_absolute (filename))
+ {
+ /* For abolute paths, we call gtk_rc_parse_file unconditionally. We
+ * don't print an error in this case.
+ */
+ to_parse = g_strdup (filename);
+ }
+ else
+ {
+ /* if a relative path, we look relative to all the RC files in the
+ * include stack. We require the file to be found in this case
+ * so we can give meaningful error messages, and because on reparsing
+ * non-absolute paths don't make sense.
+ */
+ GSList *tmp_list = rc_dir_stack;
+ while (tmp_list)
+ {
+ gchar *tmpname = g_build_filename (tmp_list->data, filename, NULL);
+
+ if (g_file_test (tmpname, G_FILE_TEST_EXISTS))
+ {
+ to_parse = tmpname;
+ break;
+ }
+
+ g_free (tmpname);
+
+ tmp_list = tmp_list->next;
+ }
+ }
+
+ if (to_parse)
+ {
+ gtk_rc_parse_file (context, to_parse, context->default_priority, FALSE);
+ g_free (to_parse);
+ }
+ else
+ {
+ g_scanner_warn (scanner,
+ _("Unable to find include file: \"%s\""),
+ filename);
+ }
+
+}
+
static guint
gtk_rc_parse_statement (GtkRcContext *context,
GScanner *scanner)
token = g_scanner_get_next_token (scanner);
if (token != G_TOKEN_STRING)
return G_TOKEN_STRING;
- gtk_rc_parse_file (context, scanner->value.v_string, context->default_priority, FALSE);
+ parse_include_file (context, scanner, scanner->value.v_string);
return G_TOKEN_NONE;
case GTK_RC_TOKEN_STYLE:
parent_class = gtk_type_class (GTK_TYPE_OBJECT);
object_class->destroy = gtk_tooltips_destroy;
-
- gtk_rc_parse_string ("style \"gtk-default-tooltips-style\" {\n"
- " bg[NORMAL] = \"#ffffc0\"\n"
- " fg[NORMAL] = \"#000000\"\n"
- "}\n"
- "\n"
- "widget \"gtk-tooltips*\" style : gtk \"gtk-default-tooltips-style\"\n");
}
static void
gtk_tooltips_init (GtkTooltips *tooltips)
{
+ static gboolean have_rc = FALSE;
+ if (have_rc)
+ {
+ have_rc = TRUE;
+
+ gtk_rc_parse_string ("style \"gtk-default-tooltips-style\" {\n"
+ " bg[NORMAL] = \"#ffffc0\"\n"
+ " fg[NORMAL] = \"#000000\"\n"
+ "}\n"
+ "\n"
+ "widget \"gtk-tooltips*\" style : gtk \"gtk-default-tooltips-style\"\n");
+ }
+
tooltips->tip_window = NULL;
tooltips->active_tips_data = NULL;
tooltips->tips_data_list = NULL;